//
//  UIView+WJFrame.m
//  IntraCityExpress
//
//  Created by HuiNaMac on 2017/2/21.
//  Copyright © 2017年 HuiNaMac. All rights reserved.
//

#import "UIView+WJFrame.h"

@implementation UIView (WJFrame)
-(void)setWj_x:(CGFloat)wj_x{
    CGRect frame = self.frame;
    frame.origin.x = wj_x;
    self.frame = frame;
}
-(CGFloat)wj_x{
    return  self.frame.origin.x;
}

-(void)setWj_y:(CGFloat)wj_y{
    CGRect frame = self.frame;
    frame.origin.y = wj_y;
    self.frame = frame;
}
-(CGFloat)wj_y{
    return self.frame.origin.y;
}

-(void)setWj_width:(CGFloat)wj_width{
    CGRect frame = self.frame;
    frame.size.width = wj_width;
    self.frame = frame;
}
-(CGFloat)wj_width{
    return self.frame.size.width;
}

-(void)setWj_height:(CGFloat)wj_height{
    CGRect frame = self.frame;
    frame.size.height = wj_height;
    self.frame = frame;
}
-(CGFloat)wj_height{
    return self.frame.size.height;
}

-(void)setWj_centerX:(CGFloat)wj_centerX{
    CGPoint center = self.center;
    center.x = wj_centerX;
    self.center = center;
}
-(CGFloat)wj_centerX{
    return self.center.x;
}

-(void)setWj_centerY:(CGFloat)wj_centerY{
    CGPoint center = self.center;
    center.y = wj_centerY;
    self.center = center;
}
-(CGFloat)wj_centerY{
    return self.center.y;
    
}
@end
